<!--  -->
<template>
  <div class="box">
    <h1>邀请好友</h1>
    <h1>来拼团</h1>
    <div class="top">
      <div class="top_1">
        <p>正在进行中</p>
      </div>
      <dl>
        <dt><img src="../../assets/Group/guo.png" alt="" /></dt>
        <dd>
          <span>已有4人参团，还差2人</span>
          <ul id="skill">
            <li><span class="bar html-css"></span></li>
          </ul>
          <p><van-count-down :time="time" /> <span>后结束</span></p>
          <button @click="detail()">查看详情</button>
        </dd>
      </dl>
    </div>
    <div class="center">
      <dl>
        <dt><img src="../../assets/Group/phone.png" alt="" /></dt>
        <dd>
          <p>【现货发顺丰 6期免息】vivo X6</p>
          <h5><b>￥88.00</b><span>￥188</span></h5>
          <button @click="GroupWork()">去拼团></button>
        </dd>
      </dl>
    </div>
    <div class="bottom">
      <dl>
        <dt><img src="../../assets/Group/iphone.png" alt="" /></dt>
        <dd>
          <p>Apple/苹果 iphone 12 手机国行</p>
          <h5><b>￥1.00</b><span>￥576</span></h5>
          <button @click="GroupWork()">去拼团></button>
        </dd>
      </dl>
    </div>
  </div>
</template>

<script>
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      time: 30 * 60 * 60 * 1000,
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    detail() {
      this.$router.push("/detailspage");
    },

    GroupWork() {
      this.$router.push("/groupwork");
    },
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
};
</script>
<style lang="scss" scoped>
.box {
  width: 100%;
  height: 100%;
  background-color: red;
}

h1 {
  margin-left: 6.5rem;
  color: white;
}

.top {
  width: 90%;
  height: 15.3rem;
  background-color: white;
  margin: auto;
  border-radius: 1.5rem 1.5rem 0.5rem 0.5rem;
  dl {
    display: flex;
    dd {
      p {
        display: flex;
        flex-direction: abs($number: 0);
        span {
          margin-top: -1rem;
        }
      }
      button {
        background: red;
        color: white;
        text-align: center;
        width: 200px;
        height: 40px;
        line-height: 40px;
        border-radius: 1.3rem;
        border: 0;
        outline: none;
        cursor: pointer;
      }
      span {
        display: block;
        padding-top: 1rem;
      }
    }
  }
}

#skill {
  list-style: none;
  font: 12px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
  width: 10rem;
  margin: auto;
  position: relative;
  line-height: 2em;
  padding: 30px 0;
}

.bar {
  height: 18px;
  margin: 1px 2px;
  position: absolute;
  border-radius: 10px;
  -moz-box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
  -webkit-box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
  box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
}

.html-css {
  //   width: 90%;
  //   -moz-animation: html-css 2s ease-out;
  //   -webkit-animation: html-css 2s ease-out;
  //   background-color: #f0bb4b;
  //   background-image: -webkit-gradient(
  //     linear,
  //     left top,
  //     left bottom,
  //     from(#f0bb4b),
  //     to(#d9aa44)
  //   );
  //   background-image: -webkit-linear-gradient(top, #f0bb4b, #d9aa44);
  //   background-image: -moz-linear-gradient(top, #f0bb4b, #d9aa44);
  //   background-image: -ms-linear-gradient(top, #f0bb4b, #d9aa44);
  //   background-image: -o-linear-gradient(top, #f0bb4b, #d9aa44);
  //   background-image: linear-gradient(top, #f0bb4b, #d9aa44);
}

.top_1 {
  height: 22%;
  background-color: rgb(254, 191, 18);
  border-radius: 1.5rem 1.5rem 0rem 0rem;
  p {
    color: white;
    font-size: 1rem;
    padding-top: 1.5rem;
    text-align: center;
  }
}

.center {
  width: 90%;
  margin: auto;
  height: 7rem;
  background-color: white;
  margin-top: 2rem;
  border-radius: 0.3rem;
  dl {
    display: flex;
    dt {
      margin-left: 0.5rem;
      margin-top: 0.5rem;
    }
    dd {
      margin-top: 0.7rem;
      h5 {
        margin-top: 1rem;
        b {
          display: inline-block;
          font-size: 1rem;
        }
        span {
          color: #ccc;
          text-decoration: line-through;
        }
      }
      button {
        width: 6rem;
        height: 2rem;
        color: white;
        text-align: center;
        line-height: 2rem;
        background-color: red;
        outline: none;
        border: none;
        cursor: pointer;
        margin-left: 7rem;
      }
    }
  }
}

.bottom {
  width: 90%;
  margin: auto;
  height: 7rem;
  background-color: white;
  margin-top: 2rem;
  border-radius: 0.3rem;
  dl {
    display: flex;
    dt {
      margin-left: 0.5rem;
      margin-top: 0.5rem;
    }
    dd {
      margin-top: 0.7rem;
      h5 {
        margin-top: 1rem;
        b {
          display: inline-block;
          font-size: 1rem;
        }
        span {
          color: #ccc;
          text-decoration: line-through;
        }
      }
      button {
        width: 6rem;
        height: 2rem;
        color: white;
        text-align: center;
        line-height: 2rem;
        background-color: red;
        outline: none;
        border: none;
        cursor: pointer;
        margin-left: 7rem;
      }
    }
  }
}
</style>
